import { defineStore } from 'pinia'
import { OrderType } from '@/api/manage/MangeModel'
export const orderStore = defineStore('orderStore', {
	//定义state
	state: () => {
		return {
			orderItem: {} //false 团圆   true团长
		}
	},
	//定义getters
	getters: {
		getorderItem: (state) => {
			return state.orderItem
		}
	},
	//定义actions
	actions: {
		setorderItem(n: OrderType) {
			this.orderItem = n
		}
	},
	persist: {
		enabled: true,
		strategies: [{ storage: localStorage, paths: ['orderItem'] }]
	}
})
